Motion vector detection apparatus, motion vector processing method and program

ABSTRACT

Disclosed herein is a motion vector detection apparatus, including: a spatial luminance difference sum total calculation section; a temporal luminance difference sum total calculation section; a search range calculation section; and a block matching calculation section.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to motion vector detection apparatuses, and more particularly to a motion vector detection apparatus and a processing method of a motion vector as well as a program for causing a computer to execute the method wherein a block matching method is used.

2. Description of the Related Art

It is widely known that dynamic picture image data can be compressed using, when the dynamic picture image data is handled, a motion vector between frames of the dynamic picture image data. As one of techniques for detecting a motion vector, a technique generally called block matching is used. According to the block matching technique, a base frame and a reference frame which are two input images are used, and a correlation degree between a base block set in the base frame and each of a plurality of reference blocks set in a search region of a reference frame is determined. Then, a motion vector with respect to the base block is calculated based on that one of reference blocks which indicates the highest one of the determined correlation degrees.

In such an existing technique as just described, since a correlation degree between each of a plurality of reference blocks set in a reference frame and a base block is calculated for each reference frame, the processing amount is great and high power consumption is required. Therefore, a technique of varying the size of the search region in a reference frame based on two input images has been proposed. For example, a motion vector detection apparatus has been proposed wherein a search region is set based on a correlation degree between a base block of a base frame and a block at a predetermined position of a reference frame. One of such motion vector detection apparatus as just described is disclosed, for example, in Japanese Patent Laid-Open No. 2000-078580 (FIG. 2).

SUMMARY OF THE INVENTION

In the motion vector detection apparatus described above, it is possible to set a search region with a predetermined size based on a correlation degree between a base block of a base frame and a block at a predetermined position of a reference frame. However, where an edge of an article or the like is included in a base block, a low correlation degree is calculated and a large search region is set. Consequently, an increased processing amount is required and increased power is consumed.

Therefore, it is desirable to provide a motion vector detection apparatus and a motion vector processing method as well as a program by which power consumption required for a motion vector detection process by a block matching technique is suppressed.

According to an embodiment of the present invention, there is provided a motion vector detection apparatus including a spatial luminance difference sum total calculation section, a temporal luminance difference sum total calculation section, a search range calculation section, and a block matching calculation section. The spatial luminance difference sum total calculation section is configured to calculate a sum total of absolute values of spatial luminance differences which are luminance differences of pixels of a base block set in a base frame with respect to a predetermined pixel. The temporal luminance difference sum total calculation section is configured to calculate a sum total of absolute values of temporal luminance differences which are luminance differences between corresponding pixels of the base block and a corresponding block in a reference frame corresponding to the base block. The search range calculation section is configured to calculate a search range of the reference frame for searching for a motion vector with respect to the base block based on the sum total of the absolute values of the spatial luminance differences and the sum total of the absolute values of the temporal luminance differences. The block matching calculation section is configured to set a reference block in the search range of the reference frame determined depending upon the search range and carry out block matching based on the correlation degree between the set reference block and the base block to calculate the motion vector. Also a processing method for the motion vector detection apparatus and a program for causing a computer to execute the processing method are provided. With the motion vector detection apparatus, processing method and program, a search range in the reference frame is calculated based on the sum total of the absolute values of the spatial luminance differences and the sum total of the absolute values of the temporal luminance differences.

The search range calculation section may calculate the search range such that, as the value of the sum total of the absolute values of the spatial luminance differences increases, the size of the search range decreases, but as value of the sum total of the absolute values of the temporal luminance differences increases, the size of the search range increases. With the motion vector detection apparatus, as the value of the sum total of the absolute values of the spatial luminance differences increases, the size of the search range decreases, but as value of the sum total of the absolute values of the temporal luminance differences increases, the size of the search range increases. In this instance, the search range calculation section may calculate the search range such that the size of the search range increases in inverse proportion to the sum total of the absolute values of the spatial luminance differences but increases in proportion to the sum total of the absolute values of the temporal luminance differences. With the motion vector detection apparatus, the size of the search range increases in inverse proportion to the sum total of the absolute values of the spatial luminance differences but increases in proportion to the sum total of the absolute values of the temporal luminance differences.

The spatial luminance difference sum total calculation section may calculate, as the sum total of the absolute values of the spatial luminance differences, sum totals of absolute values of the spatial luminance differences in both of a horizontal direction and a vertical direction with respect to the base block, and the search range calculation section may calculate search ranges in the horizontal and vertical directions based on the sum total of the absolute values of the temporal luminance differences and the sum totals of the absolute values of the spatial luminance differences in the horizontal and vertical directions. With the motion vector detection apparatus, sum totals of absolute values of the spatial luminance differences in both of a horizontal direction and a vertical direction with respect to the base block are calculated, and search ranges in the horizontal and vertical directions are calculated based on the sum total of the absolute values of the temporal luminance differences and the sum totals of the absolute values of the spatial luminance differences in the horizontal and vertical directions. In this instance, the spatial luminance difference sum total calculation section may add the absolute values of the spatial luminance differences in the horizontal and vertical directions to a positive side spatial luminance difference sum total or totals or a negative side spatial luminance difference sum total or totals based on the sign of the temporal luminance difference with respect to the predetermined pixel in the base block and the signs of the spatial luminance differences in the horizontal and vertical directions. With the motion vector detection apparatus, the absolute values of the spatial luminance differences in the horizontal and vertical directions are added to a positive side spatial luminance difference sum total or totals or a negative side spatial luminance difference sum total or totals based on the sign of the temporal luminance difference with respect to the predetermined pixel in the base block and the signs of the spatial luminance differences in the horizontal and vertical directions. In this instance, the temporal luminance difference sum total calculation section may add the absolute values of the temporal luminance differences in the horizontal and vertical directions to the positive side temporal luminance difference sum total or totals or the negative side temporal luminance difference sum total or totals based on the sign of the temporal luminance difference with respect to the predetermined pixel in the base block and the signs of the spatial luminance differences in the horizontal and vertical directions. With the motion vector detection apparatus, the absolute values of the temporal luminance differences in the horizontal and vertical directions are added to the positive side temporal luminance difference sum total or totals or the negative side temporal luminance difference sum total or totals based on the sign of the temporal luminance difference with respect to the predetermined pixel in the base block and the signs of the spatial luminance differences in the horizontal and vertical directions. In this instance, the search range calculation section may include a positive side search range calculation section and a negative side search range calculation section. The positive side search range calculation section is configured to calculate the search ranges on the positive side in the horizontal and vertical directions based on the positive side spatial luminance difference sum totals in the horizontal and vertical directions and the positive side temporal luminance difference sum totals in the horizontal and vertical directions. The negative side search range calculation section is configured to calculate the search ranges on the negative side in the horizontal and vertical directions based on the negative side spatial luminance difference sum totals in the horizontal and vertical directions and the negative side temporal luminance difference sum totals in the horizontal and vertical directions. With the motion vector detection apparatus, the positive side search ranges and the negative side search ranges in the horizontal and vertical directions are calculated.

Where the spatial luminance difference sum total calculation section adds the absolute values of the spatial luminance differences in the horizontal and vertical directions to a positive side spatial luminance difference sum total or totals or a negative side spatial luminance difference sum total or totals based on the sign of the temporal luminance difference with respect to the predetermined pixel in the base block and the signs of the spatial luminance differences in the horizontal and vertical directions, the motion vector detection apparatus may further include a likelihood calculation section. The likelihood calculation section is configured to calculate a positive side likelihood and a negative side likelihood based on the positive side spatial luminance difference sum totals and the negative side spatial luminance difference sum totals, respectively, in the horizontal and vertical directions. With the motion vector detection apparatus, a positive side likelihood and a negative side likelihood are calculated based on the positive side spatial luminance difference sum totals and the negative side spatial luminance difference sum totals, respectively, in the horizontal and vertical directions. In this instance, the search range calculation section may include a positive side search range calculation section and a negative side search range calculation section. The positive side search range calculation section is configured to calculate the search ranges on the positive side in the horizontal and vertical directions based on the sum totals of the absolute values of the spatial luminance differences, the sum totals of the absolute values of the temporal luminance differences and the positive side likelihoods in the horizontal and vertical directions. The negative side search range calculation section is configured to calculate the search ranges on the negative side in the horizontal and vertical directions based on the sum totals of the absolute values of the spatial luminance differences, the sum totals of the absolute values of the temporal luminance differences and the negative side likelihoods in the horizontal and vertical directions. With the motion vector detection apparatus, the positive side search ranges and the negative side search ranges in the horizontal and vertical directions are calculated based on the sum totals of the absolute values of the spatial luminance differences, the sum totals of the absolute values of the temporal luminance differences, and the positive side likelihoods and the negative side likelihoods in the horizontal and vertical directions.

The motion vector detection apparatus may further include a base luminance value production section configured to produce a base luminance value of the base block based on the luminance value of the predetermined pixel in the base block, and an effectiveness calculation section configured to calculate an effectiveness degree of each of the pixels of the base block based on the luminance values of the pixels of the base block and the base luminance value. The block matching calculation section includes a correlation calculation section configured to set a plurality of reference blocks in a search region in the reference frame which is determined depending upon the search range and calculate, for each of the reference blocks, the correlation degree of the reference block with respect to the base block based on the luminance values of the pixels in the set reference block which correspond to the pixel positions of the base block and the effective degrees corresponding to the pixel positions of the base block. With the motion vector detection apparatus, the correlation degrees between the base block and the reference blocks are calculated based on the effective degrees corresponding to the pixel positions of the base block.

The motion vector detection apparatus may be configured such that the search range calculation section determines one of the search range calculated based on the sum total of the absolute values of the spatial luminance differences and the sum total of the absolute values of the temporal luminance differences and a predetermined range as the search range. With the motion vector detection apparatus, one of the search range calculated based on the sum total of the absolute values of the spatial luminance differences and the sum total of the absolute values of the temporal luminance differences and the predetermined range is calculated as the search range.

The motion vector detection apparatus, processing method and program can achieve a superior advantage that the power consumption in the motion vector detection process by a block matching technique can be suppressed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an example of a functional configuration of a motion vector detection apparatus according to a first embodiment of the present invention;

FIGS. 2A and 2B are schematic views illustrating an example of detection of a motion vector by the motion vector detection apparatus of FIG. 1 where same two moving objects are included in a base frame and a reference frame;

FIGS. 3A and 3B are diagrammatic views illustrating an example of production of a base luminance value by a base luminance value production section of the motion vector detection apparatus of FIG. 1;

FIG. 4 is a diagrammatic view illustrating an example of calculation of an effectiveness degree by an effectiveness degree calculation section of the motion vector detection apparatus of FIG. 1;

FIGS. 5A and 5B are diagrammatic views illustrating examples of a relationship between a difference absolute value calculated by a luminance value difference calculation section and a weight calculated by a weight calculation section of the motion vector detection apparatus of FIG. 1;

FIG. 6 is a flow chart illustrating a processing procedure of a motion vector calculation process by the motion vector detection apparatus of FIG. 1;

FIG. 7 is a block diagram showing a configuration of a motion vector detection apparatus according to a second embodiment of the present invention;

FIG. 8 is a diagrammatic view illustrating an example of a search region of a reference frame defined by the motion vector detection apparatus of FIG. 7;

FIG. 9 is a block diagram showing a first example of a configuration of a search range production section of the motion vector detection apparatus of FIG. 7;

FIG. 10 is a diagrammatic view illustrating an example of a search range of a reference frame defined asymmetrically by the motion vector detection apparatus of FIG. 7;

FIG. 11 is a block diagram showing a second example of a configuration of the search range production section of the motion vector detection apparatus of FIG. 7 where the search range is set asymmetrically;

FIG. 12 is a block diagram showing a modification to the second example of the configuration of the search range production section shown in FIG. 11;

FIG. 13 is a flow chart illustrating an example of a processing procedure in a processing method of the motion vector detection apparatus of FIG. 7;

FIG. 14 is a block diagram showing an example of a configuration of a motion vector detection apparatus according to a third embodiment of the present invention;

FIG. 15 is a schematic view illustrating a hierarchical search method of the motion vector detection apparatus of FIG. 14;

FIG. 16 is a block diagram showing an example of a configuration of a motion vector detection apparatus according to a fourth embodiment of the present invention; and

FIG. 17 is a block diagram showing an example of a configuration of an image pickup apparatus used in the motion detection apparatus according to the present embodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In the following, the present invention is described in connection with preferred embodiments thereof. The description is given in the following order:

-   1. First Embodiment (block matching calculation control: example     wherein an effectiveness degree is applied to each pixel) -   2. Second Embodiment (motion vector detection control: example     wherein a search region is controlled upwardly, downwardly,     leftwardly and rightwardly) -   3. Third Embodiment (motion vector detection control: example of     application of hierarchical ME (motion estimation)) -   4. Fourth Embodiment (motion vector detection control: combination     of the example wherein an effectiveness degree is applied to each     pixel and the example wherein a search region is controlled)     <1. First Embodiment>     [Example of a Functional Configuration of a Motion Vector Detection     Apparatus]

FIG. 1 shows an example of a functional configuration of a motion vector detection apparatus according to a first embodiment of the present invention. Referring to FIG. 1, the motion vector detection apparatus 100 shown includes a base frame buffer 110, a base block determination section 120, a reference frame buffer 130, a reference block determination section 140, a base luminance value production section 150, an effectiveness calculation section 160 and a block matching calculation section 170.

The base frame buffer 110 temporarily stores an image supplied thereto through a signal line 101 as a current frame. This current frame is an image of a frame at present, for example, of a dynamic picture. The base frame buffer 110 supplies the current frame to the base block determination section 120.

The base block determination section 120 determines a position of a base block with regard to a current frame supplied thereto from the base frame buffer 110 and extracts a luminance of each pixel in the determined base block. It is to be noted that the current block is, for example, a region of a size of the current frame or part of the current frame defined in advance by the base block determination section 120. Further, the base block determination section 120 successively moves, for example, the current block in a unit of one pixel in the current frame to determine a position of the current block. Further, the base block determination section 120 successively moves, for example, the current block in a unit of a block in the current frame to determine a position of the current block. Further, the base block determination section 120 supplies the determined luminance value of each pixel in the current block to the base luminance value production section 150, effectiveness calculation section 160 and block matching calculation section 170. Further, the base block determination section 120 supplies the determined position of the current block to the reference block determination section 140 and the block matching calculation section 170.

The reference frame buffer 130 temporarily stores an image supplied thereto through a signal line 102 as a reference frame. This reference frame is an image preceding by one frame to the current frame (forward reference). The reference frame buffer 130 supplies the reference frame to the reference block determination section 140.

The reference block determination section 140 determines a position of a reference block of the reference frame supplied thereto from the reference frame buffer 130 based on the position of the current block supplied thereto from the base block determination section 120. The reference block determination section 140 defines a search region for searching for a motion vector with respect to the base block in the reference frame based on the position of the current block supplied thereto from the base block determination section 120. Then, the reference block determination section 140 determines a position of the reference block in the defined search region. It is to be noted that the search region is a region of a fixed size defined with reference to the position of the current block, for example, by the reference block determination section 140. It is to be noted that the reference block determination section 140 may determine the position of the reference block successively, for example, while spirally moving the same around the position corresponding to the current block. The reference block determination section 140 supplies the luminance value of each pixel of the reference block and the position of the reference block determined in such a manner as described above to the block matching calculation section 170.

The base luminance value production section 150 produces a base luminance value based on the luminance values of the pixels in the entire current block supplied thereto from the base block determination section 120 or in a portion of the current block determined in advance. The base luminance value here is a luminance value to be used as a base for identification of those pixels which include a moving object in the base block. The base luminance value production section 150 produces a statistical value of all pixels or some pixels in the base block as a base luminance value. The statistical value may be, for example, an average value or an intermediate value. Further, the base luminance value production section 150 produces, for example, a luminance value of one pixel in the base block as a base luminance value. Further the base luminance value production section 150 supplies the thus produced base luminance value to the effectiveness calculation section 160.

The effectiveness calculation section 160 calculates an effectiveness degree of each pixel of the base block based on the luminance value of each pixel of the base block and the base luminance value. The effectiveness calculation section 160 includes a luminance value difference calculation section 161 and a weight calculation section 162.

The luminance value difference calculation section 161 calculates, for each pixel of the base block, a difference absolute value between the base luminance value supplied thereto from the base luminance value production section 150 and the luminance value of the pixel of the base block supplied from the base block determination section 120. The luminance value difference calculation section 161 calculates the difference absolute value D(i,j) in accordance with the following expression: D(i,j)=|I _(base) −I _(c)(i,j)|  expression 1 where I_(base) is a base luminance value supplied from the base luminance value production section 150, and I_(c)(i,j) is a luminance value of each pixel of the base block supplied from the base block determination section 120. It is to be noted that (i,j) indicates the position of the pixel, and i indicates the position in the vertical direction while j indicates the position in the horizontal direction.

The luminance value difference calculation section 161 supplies the difference absolute value of each pixel of the base block calculated in such a manner as described above to the weight calculation section 162.

The weight calculation section 162 calculates a weight for each pixel of the base block. In particular, the weight calculation section 162 calculates a weight, which is an effectiveness degree of each pixel of the base block, based on the difference absolute value of the pixel of the base block supplied from the luminance value difference calculation section 161. The weight calculation section 162 supplies the weight for each pixel of the base block calculated in this manner to the block matching calculation section 170.

The block matching calculation section 170 carries out block matching based on a correlation degree between the base block and the reference block to calculate a motion vector with respect to the base block. The block matching calculation section 170 includes a correlation calculation section 171, a correlation map storage section 172, a position acquisition section 173 and a motion vector calculation section 174.

The correlation calculation section 171 calculates a weighted SAD (Sum of Absolute Difference) of each reference block with respect to the base block as a correlation degree. In particular, the correlation calculation section 171 multiplies the difference absolute value between the luminance value of each pixel of the base block and the luminance value of each pixel of the reference block corresponding to the pixel position of the base block by the weight corresponding to the pixel position to calculate a correlation value of the pixel. Then, the correlation calculation section 171 sums such correlation values to calculate a weighted SAD. The weighted SAD indicates a higher correlation degree as the value thereof decreases. In particular, the correlation calculation section 171 calculates the weighted SAD in accordance with the following expression:

$\begin{matrix} {{{Weighted}\mspace{14mu}{SAD}} = {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{W\left( {i,j} \right)}{{{I_{c}\left( {i,j} \right)} - {I_{r}\left( {i,j} \right)}}}}}} & {{expression}\mspace{14mu} 2} \end{matrix}$ where Ir(i,j) indicates the luminance value of the pixel corresponding to each pixel position of the base block, and W(i,j) indicates the weight corresponding to each pixel position of the base block.

Further, the correlation calculation section 171 supplies the calculated weighted SAD of each reference block as a correlation degree to the correlation map storage section 172.

The correlation map storage section 172 temporarily stores the correlation degrees of the reference blocks supplied thereto from the correlation calculation section 171 and the positions of the reference blocks supplied thereto from the reference block determination section 140 in an associated relationship with each other. The correlation map storage section 172 supplies the correlation degrees and the positions of all of the reference blocks stored therein to the position acquisition section 173.

The position acquisition section 173 acquires the position of that one of all reference blocks supplied thereto from the correlation map storage section 172 which has the highest correlation degree. In other words, the position acquisition section 173 acquires the position of the reference block which has the lowest weighted SAD. Where the correlation degrees and the positions of all reference blocks are stored in the correlation map storage section 172, the position acquisition section 173 acquires the position of the reference block which has the highest correlation degree. The position acquisition section 173 supplies the acquired position of the reference block to the motion vector calculation section 174.

The motion vector calculation section 174 calculates a motion vector based on the position of the reference block of the highest correlation degree supplied thereto from the position acquisition section 173 and the position of the base block supplied thereto from the base block determination section 120. The motion vector calculation section 174 supplies the calculated motion vector to a signal line 103.

Now, setting of a base frame and a reference frame in the embodiment of the present invention is described.

[Example of Detection of a Motion Vector]

FIGS. 2A and 2B illustrate an example of detection of a motion vector where same two moving objects are included in a base frame and a reference frame by the motion vector detection apparatus 100 according to the first embodiment of the present invention. In particular, FIG. 2A illustrates a base frame 200 which is a current frame of a dynamic picture, and FIG. 2B illustrates a reference frame 220 which is a frame preceding by one frame to the base frame (in the case of forward reference).

The base frame 200 includes a moving body A 201, another moving body B 202 and a base block 210 displayed therein. The moving body A 201 and the moving body B 202 move in the frames as time passes. The base block 210 is a region determined by the base block determination section 120. The base block 210 includes a right lower portion of the moving body A 201 and a background image.

The reference frame 220 includes the moving body A 201 and the moving body B 202 included in the base frame 200, a search region 221 and a reference block 230 displayed thereon. The search region 221 is a region in which the source of movement of the base block 210 defined by the reference block determination section 140 is searched. The reference block 230 includes a right lower portion of the moving body A 201 and part of the moving body B 202.

In this instance, the motion vector detection apparatus 100 sets the effectiveness degree of the pixels corresponding to the moving body A 201 included in the base block 210 to a high level to make the correlation degree between the base block 210 and the reference block 230 highest. Consequently, the motion vector detection apparatus 100 can thereafter detect a motion vector of the moving body A 201 accurately.

[Example of Production of a Base Luminance Value]

FIGS. 3A and 3B illustrate an example of production of a base luminance value by the base luminance value production section 150 according to the first embodiment of the present invention.

FIG. 3A illustrates an example wherein the luminance value of a central pixel of the base block 210 where the number of pixels on each side of the base block 210 is “5.” The base block 210 includes pixels #1 to #25 of the base block and a base pixel 211 positioned at the center of the base block 210 from among the pixels #1 to #25. A value indicated with parentheses in each of the pixels #1 to #25 is a luminance value of the pixel. Here, since the pixel #13 is the base pixel 211, “150” which is a luminance value of the pixel #13 is the base luminance value.

FIG. 3B illustrates an example wherein a statistical value of luminance values of pixels in the proximity of the center of a base block where the number of pixels on each side of the base block 210 is “4” is used as the base luminance value. Here, a base luminance value is produced from the pixels #7, #8, #12 and #13. For example, “151.5” which is an average value of the luminance values of the pixels #7, #8, #12 and #13 is determined as the base luminance.

In this manner, the base luminance value production section 150 produces a base luminance value based on the luminance values of all pixels of the base blocks from the base block determination section 120 or some of the pixels and supplies the base luminance value to the effectiveness calculation section 160.

[Example of Calculation of an Effectiveness Degree]

FIG. 4 illustrates an example of calculation of an effectiveness degree by the effectiveness calculation section 160 according to the first embodiment of the present invention. Here, a classification technique of pixels wherein the effectiveness degree is set to a high value is described taking the base block 210 shown in FIG. 3A as an example. Further, the base luminance value I_(base) is set to “150” and the threshold value D_(th) is set to “20.”

In this instance, the luminance value difference calculation section 161 calculates the difference absolute value D(i,j) between the luminance value I_(c)(i,j) of each of the pixels #1 to #25 and the base luminance value I_(base) supplied thereto from the base luminance value production section 150 in accordance with the expression (1) given hereinabove. Then, the weight calculation section 162 decides whether or not the difference absolute value D(i,j) of each of the pixels #1 to #25 is lower than the threshold value D_(th).

In the present example, the pixels #1, #4 and #15 to #25 are decided as pixels having luminance values higher than the threshold value D_(th) while the other pixels #2, #3 and #5 to #14 are decided as pixels having luminance values lower than the threshold value D_(th).

In this manner, pixels whose effectiveness degree is set to a high value are distinguished based on the difference absolute value between the luminance value of each pixel of the base block and the base luminance value.

[Example of the Relationship Between the Difference Absolute Value and the Weight]

FIGS. 5A and 5B illustrate examples of a relationship between the difference absolute value calculated by the luminance value difference calculation section 161 and the weight calculated by the weight calculation section 162 according to the first embodiment of the present invention. In particular, FIGS. 5A and 5B show graphs wherein the axis of abscissa indicates the difference absolute value D and the axis of ordinate indicates the weight W.

More particularly, FIG. 5A illustrates an example wherein the difference absolute value D calculated by the luminance value difference calculation section 161 is lower than the threshold value D_(th) and the weight W is a fixed value. Here, where the difference absolute value D(i,j) is lower than the threshold value D_(th), the weight calculation section 162 supplies a value W_(max) as the weight W(i,j) to the correlation calculation section 171. On the other hand, where the difference absolute value D(i,j) is higher than the threshold value D_(th), another value W_(min) lower than the value W_(max) is supplied as the weight W(i,j) to the correlation calculation section 171. For example, the value W_(max) and the value W_(min) are set to “1” and “0,” respectively.

In particular, the weight calculation section 162 calculates the weight W(i,j) of each pixel of the base block in accordance with the following expression:

$\begin{matrix} {{W\left( {i,j} \right)} = \left\{ \begin{matrix} W_{\min} & {{if}\left( {{D\left( {i,j} \right)} > D_{th}} \right)} \\ W_{\max} & {else} \end{matrix} \right.} & {{expression}\mspace{14mu} 3} \end{matrix}$ where W_(min) and W_(max) are constants.

In this manner, a fixed weight is calculated for a pixel whose difference absolute value D is lower than the threshold value D_(th). Consequently, in correlation degree calculation by the correlation calculation section 171, the effectiveness degree of each pixel of a base block with regard to which the difference absolute value of the luminance value from that of each pixel of the reference block is lower than the threshold value can be raised.

FIG. 5B illustrates an example wherein the weight W increases in inverse proportion to the difference absolute value D where the difference absolute value D calculated by the luminance value difference calculation section 161 is lower than the threshold value D_(th). Here, where the difference absolute value D(i,j) is lower than the threshold value D_(th), the weight W which increases in inverse proportion to the difference absolute value D is supplied as the weight W(i,j) from the weight calculation section 162 to the correlation calculation section 171. On the other hand, where the difference absolute value D(i,j) is higher than the threshold value D_(th), the value Wmin which indicates the lowest value is supplied as the weight W(i,j) to the correlation calculation section 171.

In the present example, the weight calculation section 162 calculates the weight W(i,j) of each pixel of the base block in accordance with the following expression:

$\begin{matrix} {{W\left( {i,j} \right)} = \left\{ \begin{matrix} W_{\min} & {{if}\left( {{D\left( {i,j} \right)} > D_{th}} \right)} \\ {{W_{c}\left( {D_{th} - {D\left( {i,j} \right)}} \right)} + W_{\min}} & {else} \end{matrix} \right.} & {{expression}\mspace{14mu} 4} \end{matrix}$ where W_(min) and W_(c) are constants.

In this manner, for a pixel with regard to which the difference absolute value D is lower than the threshold value D_(th), a weight which increases in inverse proportion to the difference absolute value D can be calculated. Consequently, in the correlation degree calculation by the correlation calculation section 171, the effectiveness degree can be set to a higher value as the difference absolute value between the luminance value of each pixel of the base block and the luminance value of each pixel in the reference block decreases.

[Example of Operation of the Motion Vector Detection Apparatus]

Now, operation of the motion vector detection apparatus 100 of the embodiment of the present invention is described with reference to the drawings.

FIG. 6 illustrates an example of a processing procedure of a motion vector calculation process of the motion vector detection apparatus 100 according to the first embodiment of the present invention.

First, the base block determination section 120 determines a base block in a base frame from the base frame buffer 110 at step S911. Then, the base luminance value production section 150 produces a base luminance value based on luminance values of pixels of the entire base block from the base block determination section 120 or of part of the base block defined in advance at step S912. Then, the luminance value difference calculation section 161 calculates a difference absolute value between the base luminance value from the base luminance value production section 150 and the luminance value of each pixel of the base block at step S913. Then, the weight calculation section 162 calculates the weight for each pixel of the base block based on the base absolute value of each pixel of the base block from the luminance value difference calculation section 161 at step S914.

Then, the reference block determination section 140 determines a reference block in a reference frame from the reference frame buffer 130 at step S915. Then, the correlation calculation section 171 calculate a correlation degree between the base block and the reference block based on the weights for the pixels of the base block, the luminance values of the pixels of the base block and the luminance values of the pixels of the reference block at step S916.

Then, the correlation degree calculated by the correlation calculation section 171 and the position of the reference block are stored in an associated relationship with each other into the correlation map storage section 172 at step S917. Then, the position acquisition section 173 decides at step S918 whether or not the correlation degree and the position in regard to all reference blocks determined in a search range are stored in the correlation map storage section 172. Then, if the correlation degree and the position with regard to all reference blocks are not stored as yet, then the processing returns to step S915 so that the processes described above are repeated until the correlation degree and the position with regard to all reference blocks set in the search region are stored.

On the other hand, if the correlation degree and the position with regard to all reference blocks are stored, then the position of the reference block whose correlation degree is highest is acquired by the position acquisition section 173 at step S919. Then, the motion vector calculation section 174 calculates a motion vector based on the position of the reference block from the position acquisition section 173 and the position of the base block at step S920.

Then, it is decided at step S921 whether or not the motion vector is calculated with regard to all base blocks by the motion vector calculation section 174. Then, if the calculation of the motion vector is not completed with regard to all of the base blocks as yet, then the processing returns to step S911, at which a new base block is determined to thereafter carry out the processes at the steps beginning with step S912. On the other hand, if the motion vector is calculated with regard to all base blocks, then the motion vector calculation process is ended.

In this manner, with the first embodiment of the present invention, the effectiveness degree of each pixel of a base block calculated by the effectiveness calculation section 160 is reflected on the calculation of the correlation degree between the base block and a reference block. Therefore, the detection accuracy of a motion vector can be improved.

<2. Second Embodiment>

FIG. 7 shows a configuration of a motion vector detection apparatus according to a second embodiment of the present invention. Referring to FIG. 7, the motion vector detection apparatus 300 shown includes a corresponding block extraction section 310, a search range production section 320, a base frame buffer 110, a base block determination section 120, a reference frame buffer 130, a reference block determination section 140 and a block matching calculation section 870. The block matching calculation section 870 includes a correlation calculation section 871, a correlation map storage section 872, a position acquisition section 873 and a motion vector calculation section 874. Here, the base frame buffer 110, base block determination section 120 and reference frame buffer 130 are similar to those described hereinabove with reference to FIG. 1, and therefore, overlapping description of them is omitted herein to avoid redundancy.

The corresponding block extraction section 310 extracts the luminance values of all pixels or some of the pixels defined in advance of a corresponding block in a reference frame which corresponds to the position of a base block. In particular, the corresponding block extraction section 310 sets a position of a corresponding block based on the position of a base block supplied thereto from the base block determination section 120. Then, the corresponding block extraction section 310 extracts, from among luminance values of pixels in the reference frame supplied thereto from the reference frame buffer 130, the luminance values of the pixels in the thus set corresponding block. Further, the corresponding block extraction section 310 supplies the extracted luminance values of the pixels in the corresponding blocks to the search range production section 320 through a signal line 311.

The search range production section 320 produces a search region in a reference frame for calculating a motion vector with respect to a base block based on a luminance value of all pixel or some of the pixel in the corresponding block and the luminance value of all pixel or some of the pixel in the base block. In particular, the search range production section 320 calculates the sum total of absolute values of spatial luminance differences which are luminance differences in a space between pixels with regard to the all pixel or some of the pixel defined in advance in the base block supplied from the base block determination section 120. Further, the search range production section 320 calculates the sum total of absolute values of temporal luminance differences which are luminance differences on the time base between corresponding pixels of the base block from the base block determination section 120 and the corresponding block from the corresponding block extraction section 310. Then, the search range production section 320 calculates a search range of the reference frame based on the sum total of the absolute values of the spatial luminance differences and the sum total of the absolute values of the temporal luminance differences. Further, the search range production section 320 supplies the calculated search range of the reference frame to the reference block determination section 140 through a signal line 329.

The reference block determination section 140 defines a search region in the reference frame based on the position of the base block supplied from the base block determination section 120 and the search range supplied from the search range production section 320. Then, the reference block determination section 140 successively determines a reference block within the search range in such a manner as described hereinabove with reference to FIG. 1. Further, the reference block determination section 140 supplies the luminance value of the pixels in the determined reference block to the correlation calculation section 871 and stores the position of the reference block into the correlation map storage section 872.

The block matching calculation section 870 carries out block matching based on the correlation degree between the reference block and the base block to calculate a motion vector of the reference block. The correlation calculation section 871 calculates, for each reference block, as the correlation degree, a SAD which is the sum total of absolute values of luminance differences between corresponding pixels of the base block from the base block determination section 120 and the reference block from the reference block determination section 140. This signifies that, as the SAD has a decreasing value, the correction degree has an increasing value. The correlation calculation section 871 stores the correlation degree calculated for each reference block into the correlation map storage section 872.

The correlation map storage section 872 temporarily stores the correlation degree of the reference block supplied from the correlation calculation section 871 and the position of the reference block supplied from the reference block determination section 140 in an associated relationship with each other. The correlation map storage section 872 supplies the correlation degrees and positions of all of the reference blocks stored therein to the position acquisition section 873.

The position acquisition section 873 acquires the position of that one of all reference blocks supplied thereto from the correlation map storage section 872 which exhibits the highest correlation degree. In other words, the position acquisition section 873 acquires the position of the reference block which has the lowest weighted SAD. In particular, when the correlation and the position with regard to all reference blocks are stored in the correlation map storage section 872, the position acquisition section 873 acquires the position of the reference block which exhibits the highest correlation. Further, the position acquisition section 873 supplies the acquired position of the reference block to the motion vector calculation section 874.

The motion vector calculation section 874 calculates a motion vector based on the position of the reference vector supplied thereto from the position acquisition section 873 and having the highest correlation degree and the position of the base block supplied from the base block determination section 120.

Here, an example of a search region in a reference frame defined based on the search range produced by the search range production section 320 and the position of the base block is described with reference to the accompanying drawings.

[Example of Definition of a Search Region]

FIG. 8 shows an example of a search region in a reference frame defined by the motion vector detection apparatus 100 according to the second embodiment of the present invention. Referring to FIG. 8, a search region 410 and a maximum search region 430 in the reference frame are shown. Here, the horizontal direction and the vertical direction of the base block are defined as an x direction and a y direction, respectively.

The search region 410 is a region defined by a search range L_(x) in the x direction and a search range L_(y) in the y direction produced by the search range production section 320 and a search region base block 240. The search region base block 240 is a block at a position same as the position of a base block in the reference frame. In particular, the search region base block 240 is set to a position at which the motion vector with respect to the base block is “0.”

The search range L_(x) in the x direction indicates a maximum range within which the reference block can be moved to the right side and the left side in the x direction with reference to the base block 210. The search range L_(y) in the y direction indicates a maximum range within which the reference block can be moved to the upper side and the lower side in the y direction with reference to the search region base block 240.

The maximum search region 430 is a region defined based on the maximum search range L_(max) and the search region base block 240. The maximum search range L_(max) is determined based on the resolution and compression ratio of an image and is set, for example, to 32 pixels.

Since the search range production section 320 produces the search range L_(x) in the x direction and the search range L_(y) in the y direction in this manner, the motion vector detection apparatus 300 can define the search ranges in the x direction and the y direction independently of each other within the search region. Further, the motion vector detection apparatus 300 can prevent expansion of the search region exceeding the defined maximum region by providing the maximum search range L_(max). Now, examples of a configuration of the search range production section 320 which produces the search range L_(x) in the x direction and the search range L_(y) in the y direction are described with reference to FIG. 9.

[First Example of a Configuration of the Search Range Production Section]

FIG. 9 shows a first example of a configuration of the search range production section 320 in the second embodiment of the present invention. Referring to FIG. 9, the search range production section 320 includes an F_(t) calculation section 330, an F_(s) calculation section 340 and an L calculation section 370.

The F_(t) calculation section 330 calculates the sum total of temporal luminance differences, which are luminance differences between corresponding pixels in a corresponding block supplied from the signal line 311 and a base block supplied from a signal line 121, as a temporal luminance difference sum total F_(t). The F_(t) calculation section 330 calculates the temporal luminance difference sum total F_(t) in accordance with the following expression and supplies the calculated temporal luminance difference sum total F_(t) to the L calculation section 370. Incidentally, the F_(t) calculation section 330 is an example of a temporal luminance difference sum total section.

$\begin{matrix} {F_{t} = {{\sum\limits_{{i = 0},{j = 0}}^{N,N}{{I_{t}\left( {i.j} \right)}}} = {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{{I_{c}\left( {i,j} \right)} - {I_{r}\left( {i,j} \right)}}}}}} & {{expression}\mspace{14mu} 5} \end{matrix}$ where I_(t)(i,j) is a temporal luminance difference, I_(c)(i,j) a luminance value of a pixel in the base block, I_(r)(i,j) a luminance value of a pixel in the reference block, i and j are a pixel position in the x direction and a pixel position in the y direction of each block, respectively, and N is a value obtained by subtracting “1” from the number of pixels in the different pixels in each block.

In this manner, as the speed at which a moving body moves increases, the difference in position between a moving body included in the base block and the same moving body included in the corresponding block, and consequently, the temporal luminance difference sum total F_(t) calculated in accordance with the expression given above is likely to have a high value. On the other hand, since the difference in position of a moving body between the base block and the corresponding block decreases as the speed at which the moving body moves decreases, the temporal luminance difference sum total F_(t) is likely to become low. From this, the speed of a moving body included in the base block can be estimated.

The F_(s) calculation section 340 calculates the sum total of absolute values of spatial luminance differences which are luminance differences between adjacent pixels to pixels in the base block supplied from the signal line 121 as a spatial luminance difference sum total. Incidentally, the F_(s) calculation section 340 is an example of the temporal luminance difference sum total section.

The F_(s) calculation section 340 calculates spatial luminance difference sum totals in both of a horizontal direction and a vertical direction with respect to the base block, respectively. The F_(s) calculation section 340 includes an F_(x) calculation section 350 and an F_(y) calculation section 360. The F_(x) calculation section 350 calculates the sum total of absolute values of spatial luminance differences in the horizontal direction with regard to the pixels in the base block as a spatial luminance difference sum total in the x direction. In particular, the F_(x) calculation section 350 calculates the sum total of luminance differences between adjacent pixels in the x direction to the pixels in the base block as a spatial luminance difference sum total F_(x) in the x direction. The spatial luminance difference sum total F_(x) in the x direction is a value representative of a component of the spatial luminance difference sum total F_(s) in the x direction. The F_(x) calculation section 350 supplies the calculated spatial luminance difference sum total F_(x) in the x direction to an L_(x) calculation section 380. Incidentally, the F_(x) calculation section 350 is an example of the temporal luminance difference sum total section.

The F_(y) calculation section 360 calculates the sum total of absolute values of spatial luminance differences in the vertical direction with regard to the pixels in the base block as a spatial luminance difference sum total in the y direction. In particular, the F_(y) calculation section 360 calculates the sum total of luminance differences between adjacent pixels in the y direction to the pixels in the base block as a spatial luminance difference sum total F_(y) in the y direction. The spatial luminance difference sum total F_(y) in the y direction is a value representative of a component of the spatial luminance difference sum total F_(s) in the y direction. The F_(y) calculation section 360 supplies the calculated spatial luminance difference sum total F_(y) in the y direction to the L_(x) calculation section 390. Incidentally, the F_(y) calculation section 360 is an example of the temporal luminance difference sum total section.

The spatial luminance difference sum total F_(x) in the x direction and the spatial luminance difference sum total F_(y) in the y direction described above can be presented by the following expression:

$\begin{matrix} \begin{matrix} {F_{s} = \begin{pmatrix} F_{x} \\ F_{y} \end{pmatrix}} \\ {= \begin{pmatrix} {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{I_{x}\left( {i,j} \right)}}} \\ {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{I_{y}\left( {i,j} \right)}}} \end{pmatrix}} \\ {= \begin{pmatrix} {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{{I_{c}\left( {{i + 1},j} \right)} - {I_{c}\left( {i,j} \right)}}}} \\ {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{{I_{c}\left( {i,{j + 1}} \right)} - {I_{c}\left( {i,j} \right)}}}} \end{pmatrix}} \end{matrix} & {{expression}\mspace{14mu} 6} \end{matrix}$ where I_(x)(i,j) is a spatial luminance difference in the x direction with regard to each pixel in the base block, and I_(y)(i,j) is a spatial luminance difference in the y direction with regard to each pixel in the base block.

As the speed at which the moving body moves increases, the image of the moving body included in the base block comes to have an increasing amount of blurring, and therefore, the spatial luminance difference sum total F_(s) calculated in accordance with the expression given above is likely to have a low value. On the other hand, as the speed at which the moving body moves decreases, the image of the moving body included in the base block comes to have a decreasing amount of blurring, and therefore, the spatial luminance difference sum total F_(s) is likely to have a high value. Consequently, the speed of the moving body included in the base block can be estimated.

The L calculation section 370 calculates a search range in the reference frame for searching for a motion vector with respect to the base block based on the temporal luminance difference sum total F_(t) from the F_(t) calculation section 330 and the spatial luminance difference sum total F_(s) from the F_(s) calculation section 340. This L calculation section 370 sets a decreasing search range as the spatial luminance difference sum total F_(s) increases and sets an increasing search range as the temporal luminance difference sum total F_(t) increases. In other words, the L calculation section 370 calculates the search range which increases in inverse proportion to the spatial luminance difference sum total F_(s) but increases in proportion to the temporal luminance difference sum total F_(t). Then, the L calculation section 370 calculates one of the search range calculated in this manner and a predetermined range as a search range in the reference frame. In particular, the L calculation section 370 calculates the search range L based on the following function G:

$\begin{matrix} {L = {{G\left( {F_{t},F_{s}} \right)} = {\min\left( {{\alpha\frac{F_{t}}{F_{s}}},L_{\max}} \right)}}} & {{expression}\mspace{14mu} 7} \end{matrix}$ where L_(max) is a maximum search range illustrated in FIG. 8, and α is a fixed value and is set, for example, to “1.” From the expression above, the search range becomes small if α is set to a low value, and therefore, the processing amount by block matching can be suppressed.

The L calculation section 370 supplies the calculated search range L to the reference block determination section 140 through the signal line 329. Incidentally, the L calculation section 370 is an example of a search range calculation section.

Further, the L calculation section 370 calculates search ranges in the different directions based on the sum total of absolute values of temporal luminance differences and the sum total of absolute values of spatial luminance values in the different directions. The L calculation section 370 includes an L_(x) calculation section 380 and an L_(y) calculation section 390. The L_(x) calculation section 380 calculates the search range L_(x) in the x direction illustrated in FIG. 8. In particular, the L_(x) calculation section 380 calculates the search range L_(x) in the x direction based on the temporal luminance difference sum total F_(t) from the F_(t) calculation section 330 and the spatial luminance difference sum total F_(x) in the x direction from the F_(x) calculation section 350. The L_(x) calculation section 380 supplies the calculated search range L_(x) in the x direction to the reference block determination section 140 through the signal line 329.

The L_(y) calculation section 390 calculates the search range L_(y) in the y direction illustrated in FIG. 8. In particular, the L_(y) calculation section 390 calculates the search range L_(y) in the y direction based on the temporal luminance difference sum total F_(t) from the F_(t) calculation section 330 and the spatial luminance difference sum total F_(y) in the y direction from the F_(y) calculation section 360. The L_(y) calculation section 390 supplies the calculated search range L_(y) in the y direction to the reference block determination section 140 through the signal line 329.

Here, as an example for calculation of the search range L_(x) in the x direction and the search range L_(y) in the y direction described above, the following expression can be applied:

$\begin{matrix} {\begin{pmatrix} L_{x} \\ L_{y} \end{pmatrix} = \begin{pmatrix} {G\left( {F_{t},F_{x}} \right)} \\ {G\left( {F_{t},F_{y}} \right)} \end{pmatrix}} & {{expression}\mspace{14mu} 8} \end{matrix}$

Since a movement of a material body included in the base block can be estimated accurately using the two parameters of the temporal luminance difference sum total F_(t) and the spatial luminance difference sum total F_(s) in this manner, a search region conforming to a movement of the material body in the base block can be defined. Further, by calculating the search ranges in the x direction and the y direction separately from each other, an optimum search range can be defined. It is to be noted here that, while the search ranges in the x direction and the y direction described above are produced symmetrically, an example wherein search ranges in upward and downward directions and in leftward and rightward directions are produced separately with regard to the search region base block 240 is described below.

[Example of Definition of the Search Range]

FIG. 10 illustrates an example of a search region in a reference frame defined asymmetrically by the motion vector detection apparatus 300 in the second embodiment of the present invention. In FIG. 10, a search region 420 and a maximum search region 430 in a reference frame are illustrated. Incidentally, the components except the search region 420 in a reference frame are similar to those described hereinabove with reference to FIG. 8, and therefore, overlapping description of them is omitted herein to avoid redundancy.

The search region 420 is a region defined by the search region base block 240, a search range L_(x) ⁺ on the positive side and a search range L_(x) ⁻ on the negative side in the x direction and a search range L_(y) ⁺ on the positive side and a search range L_(y) ⁻ on the negative side in the y direction. The search range L_(x) ⁺ on the positive side and the search range L_(x) ⁻ on the negative side in the x direction and the search range L_(y) ⁺ on the positive side and the search range L_(y) ⁻ on the negative side in the y direction are produced by the search range production section 320.

The search range L_(x) ⁺ on the positive side in the x direction indicates a maximum range within which the reference block can be moved to the right side in the x direction with reference to the search region base block 240. The search range L_(x) ⁻ on the negative side in the x direction indicates a maximum range within which the reference block can be moved to the left side in the x direction with reference to the search region base block 240.

The search range L_(y) ⁺ on the positive side in the y direction indicates a maximum range within which the reference block can be moved to the lower side in the y direction with reference to the search region base block 240. The search range L_(y) ⁻ on the negative side in the y direction indicates a maximum range within which the reference block can be moved to the upper side in the y direction with reference to the search region base block 240.

By producing the positive and negative side search ranges in the different directions individually by means of the search range production section 320 in this manner, a search region is defined asymmetrically with reference to the search region base block 240 in the individual directions. Now, an example of a configuration of the search range production section 320 where a search region is defined asymmetrically is described below.

[Second Example of a Configuration of the Search Range Production Section]

FIG. 11 shows a second example of a configuration of the search range production section 320 where a search range is produced asymmetrically according to the second embodiment of the present invention. Referring to FIG. 11, the search range production section 320 includes an F_(t) calculation section 330, an F_(x) calculation section 350, an F_(y) calculation section 360, an L_(x) calculation section 380 and an L_(y) calculation section 390.

The F_(t) calculation section 330 includes an F_(t) ^(x−) calculation section 331, an F_(t) ^(x+) calculation section 332, an F_(t) ^(y−) calculation section 333 and an F_(t) ^(y+) calculation section 334. The F_(x) calculation section 350 includes an F_(x) ⁻ calculation section 351 and an F_(x) ⁺ calculation section 352. The F_(y) calculation section 360 includes an F_(y) ⁻ calculation section 361 and an F_(y) ⁺ calculation section 362. The L_(x) calculation section 380 includes an L_(x) ⁻ calculation section 381 and an L_(x) ⁺ calculation section 382. The L_(y) calculation section 390 includes an L_(y) ⁻ calculation section 391 and an Ly⁺ calculation section 392.

The F_(t) calculation section 330 adds absolute values of temporal luminance differences in both of the x direction and the y direction to one of the positive side temporal luminance difference sum totals and the negative side temporal luminance difference sum totals in the different directions. In particular, the F_(t) calculation section 330 adds the absolute values of the temporal luminance differences in the different directions with regard to all pixel or some of the pixel in the base block based on the sign of the temporal luminance difference with regard to all pixel or some of the pixel in the base block and the sign of the spatial luminance differences in the different directions. Incidentally, the F_(t) calculation section 330 is an example of the temporal luminance difference sum total section.

The F_(t) ^(x−) calculation section 331 adds the absolute values of the temporal luminance differences in the x direction with regard to the pixels in the base block to the negative side temporal luminance difference sum total F_(t) ^(x−) in the x direction based on the sign of the temporal luminance difference and the sign of the spatial luminance difference in the x direction with regard to the pixels. The F_(t) ^(x−) calculation section 331 supplies the calculated negative side temporal luminance difference sum total F_(t) ^(x−) in the x direction to the L_(x) ⁻ calculation section 381.

The F_(t) ^(x+) calculation section 332 adds the absolute values of the temporal luminance differences in the x direction with regard to the pixels in the base block to the positive side temporal luminance difference sum total F_(t) ^(x+) in the x direction based on the sign of the temporal luminance difference and the sign of the spatial luminance difference in the x direction with regard to the pixels. The F_(t) ^(x+) calculation section 332 supplies the calculated positive side temporal luminance difference sum total F_(t) ^(x+) in the x direction to the L_(x) ⁺ calculation section 382.

The F_(t) ^(y−) calculation section 333 adds the absolute values of the temporal luminance differences in the y direction with regard to the pixels in the base block to the negative side temporal luminance difference sum total F_(t) ^(y−) in the y direction based on the sign of the temporal luminance difference and the sign of the spatial luminance difference in the y direction with regard to the pixels. The F_(t) ^(y−) calculation section 333 supplies the calculated negative side temporal luminance difference sum total F_(t) ^(y−) in the y direction to the L_(y) ⁻ calculation section 391.

The F_(t) ^(y+) calculation section 334 adds the absolute values of the spatial luminance differences in the y direction with regard to the pixels in the base block to the positive side temporal luminance difference sum total F_(t) ^(y+) in the y direction based on the sign of the temporal luminance difference and the sign of the spatial luminance difference in the y direction with regard to the pixels. The F_(t) ^(y+) calculation section 334 supplies the calculated positive side temporal luminance difference sum total F_(t) ^(y+) in the y direction to the L_(y) ⁺ calculation section 392.

Here, for calculation of the negative side temporal luminance difference sum total F_(t) ^(x−) in the x direction, positive side temporal luminance difference sum total F_(t) ^(x+) in the x direction, negative side temporal luminance difference sum total F_(t) ^(y−) in the y direction and positive side temporal luminance difference sum total F_(t) ^(y+) in the y direction, the following expression can be used:

$\begin{matrix} {\begin{pmatrix} F_{t}^{x -} & F_{t}^{x +} \\ F_{t}^{y -} & F_{t}^{y +} \end{pmatrix} = \begin{pmatrix} {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{I_{t}^{x -}\left( {i,j} \right)}}} & {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{I_{t}^{x +}\left( {i,j} \right)}}} \\ {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{I_{t}^{y -}\left( {i,j} \right)}}} & {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{I_{t}^{y +}\left( {i,j} \right)}}} \end{pmatrix}} & {{expression}\mspace{14mu} 9} \end{matrix}$ where I_(t) ^(x−)(i,j), I_(t) ^(x+)(i,j), I_(t) ^(y−)(i,j) and I_(t) ^(y+)(i,j) can be represented by the following expressions:

$\begin{matrix} {\left( {{I_{t}^{x -}\left( {i,j} \right)}\mspace{14mu}{I_{t}^{x +}\left( {i,j} \right)}} \right) = \left\{ {{\begin{matrix} \left( {{I_{t}\left( {i,j} \right)}\mspace{14mu} 0} \right) & {{if}\left( {{{- I_{x}}I_{t}} < 0} \right)} \\ \left( {0\mspace{14mu}{I_{t}\left( {i,j} \right)}} \right) & {else} \end{matrix}\left( {{I_{t}^{y -}\left( {i,j} \right)}\mspace{14mu}{I_{t}^{y +}\left( {i,j} \right)}} \right)} = \left\{ \begin{matrix} \left( {{I_{t}\left( {i,j} \right)}\mspace{14mu} 0} \right) & {{if}\left( {{{- I_{y}}I_{t}} < 0} \right)} \\ \left( {0\mspace{14mu}{I_{t}\left( {i,j} \right)}} \right) & {else} \end{matrix} \right.} \right.} & {{expression}\mspace{14mu} 10} \end{matrix}$

In this manner, the F_(t) calculation section 330 uses the direction of the speed of a moving body estimated based on the sign of the spatial luminance difference and the sign of the temporal luminance difference with regard to each pixel in the base block to calculate the sum total of absolute values of temporal luminance differences on the positive side and the negative side in the directions.

The F_(x) calculation section 350 adds the absolute value of the spatial luminance difference in the x direction with regard to all pixel or some of the pixel in the base block to one of the positive side temporal luminance difference sum total and the negative side temporal luminance difference sum total in the x direction. In particular, the F_(x) calculation section 350 adds the spatial luminance difference in the x direction with regard to all pixel or some of the pixel in the base block based on the sign of the temporal luminance difference with regard to all pixel or some of the pixel and the sign of the spatial luminance difference in the different directions. Incidentally, the F_(x) calculation section 350 is an example of a spatial luminance difference sum total section.

The F_(x) ⁻ calculation section 351 adds the absolute value of the spatial luminance difference in the x direction with regard to each pixel in the base block to the negative side spatial luminance difference sum total F_(x) ⁻ in the x direction based on the sign of the temporal luminance difference with regard to the pixel and the sign of the spatial luminance difference in the x direction. The F_(x) ⁻ calculation section 351 supplies the calculated negative side spatial luminance difference sum total F_(x) ⁻ in the x direction to the L_(x) ⁻ calculation section 381.

The F_(x) ⁺ calculation section 352 adds the absolute value of the spatial luminance difference in the x direction with regard to each pixel in the base block to the positive side spatial luminance difference sum total F_(x) ⁺ in the x direction based on the code of the temporal luminance difference with regard to the pixel and the sign of the spatial luminance difference in the x direction. The F_(x) ⁺ calculation section 352 supplies the calculated positive side spatial luminance difference sum total F_(x) ⁺ in the x direction to the L_(x) ⁺ calculation section 382.

The F_(y) calculation section 360 adds the absolute value of the spatial luminance difference in the y direction with regard to all pixel or some of the pixel in the base block to one of the positive side spatial luminance difference sum total and the negative side spatial luminance difference sum total in the y direction. In particular, the F_(y) calculation section 360 adds the spatial luminance difference in the y direction with regard to the pixel in the base block based on the sign of the temporal luminance difference with regard to all pixel or some of the pixel and the sign of the spatial luminance difference in the different directions. Incidentally, the F_(y) calculation section 360 is an example of the spatial luminance difference sum total section.

The F_(y) ⁻ calculation section 361 adds the absolute value of the spatial luminance difference in the y direction with regard to each pixel in the base block to the negative side spatial luminance difference sum total F_(y) ⁻ in the y direction based on the sign of the temporal luminance difference with regard to the pixel and the sign of the spatial luminance difference in the y direction. The F_(y) ⁻ calculation section 361 supplies the calculated negative side spatial luminance difference sum total F_(y) ⁻ in the y direction to the L_(y) ⁻ calculation section 391.

The F_(y) ⁺ calculation section 362 adds the absolute value of the spatial luminance difference in the y direction with regard to each pixel in the base block to the positive side spatial luminance difference sum total F_(y) ⁺ in the y direction based on the sign of the temporal luminance difference with regard to the pixel and the sign of the spatial luminance difference in the y direction. The F_(y) ⁺ calculation section 362 supplies the calculated positive side spatial luminance difference sum total F_(y) ⁺ in the y direction to the L_(y) ⁺ calculation section 392.

The negative side spatial luminance difference sum total F_(x) ⁻ in the x direction, positive side spatial luminance difference sum total F_(x) ⁺ in the x direction, negative side spatial luminance difference sum total F_(y) ⁻ in the y direction and positive side spatial luminance difference sum total F_(y) ⁺ in the y direction can be calculated in accordance with the following expression:

$\begin{matrix} {\begin{pmatrix} F_{x}^{-} & F_{x}^{+} \\ F_{y}^{-} & F_{y}^{+} \end{pmatrix} = \begin{pmatrix} {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{I_{x}^{-}\left( {i,j} \right)}}} & {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{I_{x}^{+}\left( {i,j} \right)}}} \\ {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{I_{y}^{-}\left( {i,j} \right)}}} & {\sum\limits_{{i = 0},{j = 0}}^{N,N}{{I_{y}^{+}\left( {i,j} \right)}}} \end{pmatrix}} & {{expression}\mspace{14mu} 11} \end{matrix}$ where I_(x) ⁻(i,j), I_(x) ⁺(i,j), I_(y) ⁻(i,j) and I_(y) ⁺(i,j) can be represented by the following expressions:

$\begin{matrix} {\left( {{I_{x}^{-}\left( {i,j} \right)}\mspace{14mu}{I_{x}^{+}\left( {i,j} \right)}} \right) = \left\{ {{\begin{matrix} \left( {{I_{x}\left( {i,j} \right)}\mspace{14mu} 0} \right) & {{if}\left( {{{- I_{x}}I_{t}} < 0} \right)} \\ \left( {0\mspace{14mu}{I_{x}\left( {i,j} \right)}} \right) & {else} \end{matrix}\left( {{I_{y}^{-}\left( {i,j} \right)}\mspace{14mu}{I_{y}^{+}\left( {i,j} \right)}} \right)} = \left\{ \begin{matrix} \left( {{I_{y}\left( {i,j} \right)}\mspace{14mu} 0} \right) & {{if}\left( {{{- I_{y}}I_{t}} < 0} \right)} \\ \left( {0\mspace{14mu}{I_{y}\left( {i,j} \right)}} \right) & {else} \end{matrix} \right.} \right.} & {{expression}\mspace{14mu} 12} \end{matrix}$

In this manner, the F_(x) calculation section 350 and the F_(y) calculation section 360 use the direction of the speed of a moving body estimated based on the sign of the spatial luminance difference and the sign of the temporal luminance difference with regard to each pixel in the base block to calculate the sum total of absolute values of the spatial luminance differences on the positive side and the negative side.

The L_(x) calculation section 380 calculates the search range L_(x) ⁻ on the negative side and the search range L_(x) ⁺ on the positive side in the x direction. The L_(x) ⁻ calculation section 381 calculates the search range L_(x) ⁻ on the negative side in the x direction based on the negative side spatial luminance difference sum total F_(x) ⁻ in the x direction and the negative side temporal luminance difference sum total F_(t) ^(x−) in the x direction. The L_(x) ⁻ calculation section 381 supplies the calculated search range L_(x) ⁻ on the negative side in the x direction to the reference block determination section 140 through the signal line 329. Incidentally, the L_(x) ⁻ calculation section 381 is an example of a negative side search range calculation section.

The L_(x) ⁺ calculation section 382 calculates the search range L_(x) ⁺ on the positive side in the x direction based on the positive side spatial luminance difference sum total F_(x) ⁺ in the x direction and the positive side temporal luminance difference sum total F_(t) ^(x+) in the x direction. The L_(x) ⁺ calculation section 382 supplies the calculated search range L_(x) ⁺ on the positive side in the x direction to the reference block determination section 140 through the signal line 329. Incidentally, the L_(x) ⁺ calculation section 382 is an example of a positive side search range calculation section.

The L_(y) calculation section 390 calculates the search range L_(y) ⁻ on the negative side and the search range L_(y) ⁺ on the positive side in the y direction. The L_(y) ⁻ calculation section 391 calculates the search range L_(y) ⁻ on the negative side in the y direction based on the negative side spatial luminance difference sum total F_(y) ⁻ in the y direction and the negative side temporal luminance difference sum total F_(t) ^(y−) in the y direction. The L_(y) ⁻ calculation section 391 supplies the calculated search range L_(y) ⁻ on the negative side in the y direction to the reference block determination section 140 through the signal line 329. Incidentally, the L_(y) ⁻ calculation section 391 is an example of the negative side search range calculation section.

The L_(y) ⁺ calculation section 392 calculates the search range L_(y) ⁺ on the positive side in the y direction based on the positive side spatial luminance difference sum total F_(y) ⁺ in the y direction and the positive side temporal luminance difference sum total F_(t) ^(y+) in the y direction. The L_(y) ⁺ calculation section 392 supplies the calculated search range L_(y) ⁺ on the positive side in the y direction to the reference block determination section 140 through the signal line 329. Incidentally, the L_(y) ⁺ calculation section 392 is an example of the positive side search range calculation section.

The search range L_(x) ⁻ on the negative side and the search range L_(x) ⁺ on the positive side in the x direction and the search range L_(y) ⁻ on the negative side and the search range L_(y) ⁺ on the positive side in the y direction can be calculated in accordance with the following expression:

$\begin{matrix} {\begin{pmatrix} L_{x}^{-} & L_{x}^{+} \\ L_{y}^{-} & L_{y}^{+} \end{pmatrix} = \begin{pmatrix} {G\left( {F_{t}^{x -},F_{x}^{-}} \right)} & {G\left( {F_{t}^{x +},F_{x}^{+}} \right)} \\ {G\left( {F_{t}^{y -},F_{y}^{-}} \right)} & {G\left( {F_{t}^{y +},F_{y}^{+}} \right)} \end{pmatrix}} & {{expression}\mspace{14mu} 13} \end{matrix}$

In this manner, by producing search ranges on the positive side and the negative side in the different directions by means of the search range production section 320, a search region can be defined asymmetrically in the different directions. Consequently, since a search range can be defined more appropriately than that by the configuration of FIG. 9, a motion vector can be detected with a higher degree of accuracy. It is to be noted that, with the present configuration, the number of registers in the motion vector detection apparatus 300 is great. Therefore, a modification described below is improved so as to decrease the number of registers.

[Modification to the Second Example of the Configuration Of the Search Range Production Section]

FIG. 12 shows a modification to the second example of the configuration of the search range production section 320 where the search range is set asymmetrically in the second embodiment of the present invention.

Referring to FIG. 12, the base block determination section 120 includes a ρ_(x) calculation section 510 and a ρ_(y) calculation section 520 in place of the F_(t) calculation section 330 in the configuration described hereinabove with reference to FIG. 11, and further includes an F_(t) calculation section 330, an F_(x) calculation section 350 and an F_(y) calculation section 360 described hereinabove with reference to FIG. 9. Since the F_(x) ⁻ calculation section 351, F_(x) ⁺ calculation section 352, F_(y) ⁻ calculation section 361 and F_(y) ⁺ calculation section 362 are similar to those described hereinabove with reference to FIG. 11, overlapping description of them is omitted herein to avoid redundancy. Also the F_(t) calculation section 330, F_(x) calculation section 350 and F_(y) calculation section 360 are similar to those described hereinabove with reference to FIG. 9, and therefore, overlapping description of them is omitted herein to avoid redundancy. Incidentally, the ρ_(x) calculation section 510 and the ρ_(y) calculation section 520 are examples of a likelihood calculation section.

The ρ_(x) calculation section 510 calculates a positive side likelihood and a negative side likelihood in the x direction based on the negative side spatial luminance difference sum total F_(x) ⁻ and the positive side spatial luminance difference sum total F_(x) ⁺ in the x direction. The ρ_(x) calculation section 510 includes a ρ_(x) ⁻ calculation section 511 and a ρ_(x) ⁺ calculation section 512.

The ρ_(x) ⁻ calculation section 511 calculates the negative side likelihood ρ_(x) ⁻ in the x direction based on the negative side spatial luminance difference sum total F_(x) ⁻ and the positive side spatial luminance difference sum total F_(x) ⁺ in the x direction. The ρ_(x) ⁻ calculation section 511 supplies the calculated negative side likelihood ρ_(x) ⁻ in the x direction to the L_(x) ⁻ calculation section 381.

The ρ_(x) ⁺ calculation section 512 calculates the positive side likelihood ρ_(x) ⁺ in the x direction based on the negative side spatial luminance difference sum total F_(X) ⁻ and the positive side spatial luminance difference sum total F_(x) ⁺ in the x direction. The ρ_(x) ⁺ calculation section 512 supplies the calculated positive side likelihood ρ_(x) ⁺ in the x direction to the L_(x) ⁺ calculation section 382.

The ρ_(y) calculation section 520 calculates the positive side likelihood and the negative side likelihood in the y direction based on the negative side spatial luminance difference sum total F_(y) ⁻ and the positive side spatial luminance difference sum total F_(y) ⁺ in the y direction. The ρ_(y) calculation section 520 includes a ρ_(y) ⁻ calculation section 521 and a ρ_(y) ⁺ calculation section 522.

The ρ_(y) ⁻ calculation section 521 calculates the negative side likelihood ρ_(y) ⁻ in the y direction based on the negative side spatial luminance difference sum total F_(y) ⁻ and the positive side spatial luminance difference sum total F_(y) ⁺ in the y direction. The ρ_(y) ⁻ calculation section 521 supplies the calculated negative side likelihood ρ_(y) ⁻ in the y direction to the L_(y) ⁻ calculation section 391.

The ρ_(y) ⁺ calculation section 522 calculates the positive side likelihood ρ_(y) ⁺ in the y direction based on the negative side spatial luminance difference sum total F_(y) ⁻ and the positive side spatial luminance difference sum total F_(y) ⁺ in the y direction. The ρ_(y) ⁺ calculation section 522 supplies the calculated positive side likelihood ρ_(y) ⁺ in the y direction to the L_(y) ⁺ calculation section 392.

The negative side likelihood ρ_(x) ⁻ in the x direction, positive side likelihood ρ_(x) ⁺ in the x direction, negative side likelihood ρ_(y) ⁻ in the y direction and positive side likelihood ρ_(y) ⁺ in the y direction can be calculated in accordance with the following expression:

$\begin{matrix} {\begin{pmatrix} \rho_{x}^{-} & \rho_{x}^{+} \\ \rho_{y}^{-} & \rho_{y}^{+} \end{pmatrix} = \begin{pmatrix} \frac{F_{x}^{-}}{\max\left( {F_{x}^{-},F_{x}^{+}} \right)} & \frac{F_{x}^{+}}{\max\left( {F_{x}^{-},F_{x}^{+}} \right)} \\ \frac{F_{y}^{-}}{\max\left( {F_{y}^{-},F_{y}^{+}} \right)} & \frac{F_{y}^{+}}{\max\left( {F_{y}^{-},F_{y}^{+}} \right)} \end{pmatrix}} & {{expression}\mspace{14mu} 14} \end{matrix}$

In this manner, the ρ_(x) calculation section 510 and the ρ_(y) calculation section 520 use the positive side luminance difference sum total and the negative side luminance difference sum total to calculate the likelihoods in the upward or downward direction and the leftward or rightward direction of a moving body included in the base block.

The L_(x) ⁻ calculation section 381 calculates the search range L_(x) ⁻ on the negative side in the x direction based on the negative side spatial luminance difference sum total F_(x) ⁻ in the x direction, the negative side temporal luminance difference sum total F_(t) ^(x−) in the x direction, and the negative side likelihood ρ_(x) ⁻ in the x direction. The L_(x) ⁻ calculation section 381 supplies the calculated search range L_(x) ⁻ on the negative side in the x direction to the reference block determination section 140 trough the signal line 329.

The L_(x) ⁺ calculation section 382 calculates the search range L_(x) ⁺ on the positive side in the x direction based on the positive side spatial luminance difference sum total F_(x) ⁺ in the x direction, the positive side temporal luminance difference sum total F_(t) ^(x+) in the x direction, and the positive side likelihood ρ_(x) ⁺ in the x direction. The L_(x) ⁺ calculation section 382 supplies the calculated search range L_(x) ⁺ on the positive side in the x direction to the reference block determination section 140 trough the signal line 329. Incidentally, the L_(x) ⁻ calculation section 381 and the L_(x) ⁺ calculation section 382 are examples of the search range calculation section.

The L_(y) ⁻ calculation section 391 calculates the search range L_(y) ⁻ on the negative side in the y direction based on the negative side spatial luminance difference sum total F_(y) ⁻ in the y direction, the negative side temporal luminance difference sum total F_(t) ^(y−) in the y direction, and the negative side likelihood ρ_(y) ⁻ in the y direction. The L_(y) ⁻ calculation section 391 supplies the calculated search range L_(y) ⁻ on the negative side in the y direction to the reference block determination section 140 trough the signal line 329.

The L_(y) ⁺ calculation section 392 calculates the search range L_(y) ⁺ on the positive side in the y direction based on the positive side spatial luminance difference sum total F_(y) ⁺ in the y direction, the positive side temporal luminance difference sum total F_(t) ^(y+) in the y direction, and the positive side likelihood ρ_(y) ⁺ in the y direction. The L_(y) ⁺ calculation section 392 supplies the calculated search range L_(y) ⁺ on the positive side in the y direction to the reference block determination section 140 trough the signal line 329. Incidentally, the L_(y) ⁻ calculation section 391 and the L_(y) ⁺ calculation section 392 are examples of the search range calculation section.

The search range L_(x) ⁻ on the negative side and the search range L_(x) ⁺ on the positive side in the x direction and the search range L_(y) ⁻ on the negative side and the search range L_(y) ⁺ on the positive side in the y direction described hereinabove can be calculated in accordance with the following expression:

$\begin{matrix} {\begin{pmatrix} L_{x}^{-} & L_{x}^{+} \\ L_{y}^{-} & L_{y}^{+} \end{pmatrix} = \begin{pmatrix} {\rho_{x}^{-}{G\left( {F_{t},F_{x}} \right)}} & {\rho_{x}^{+}{G\left( {F_{t},F_{x}} \right)}} \\ {\rho_{y}^{-}{G\left( {F_{t},F_{y}} \right)}} & {\rho_{y}^{+}{G\left( {F_{t},F_{y}} \right)}} \end{pmatrix}} & {{expression}\mspace{14mu} 15} \end{matrix}$

In this manner, by providing the ρ_(x) calculation section 510 and the ρ_(y) calculation section 520, the processing amount in calculation of the search ranges on the negative side and the positive side in the different directions can be reduced in comparison with the configuration described hereinabove with reference to FIG. 11.

[Example of Operation of the Motion Vector Detection Apparatus]

Now, operation of the motion vector detection apparatus 300 is described with reference to the drawings.

FIG. 13 illustrates an example of a processing procedure of a processing method of the motion vector detection apparatus 300 according to the second embodiment of the present invention.

Referring to FIG. 13, the base block determination section 120 first determines a base block in a base frame from the base frame buffer 110 at step S931. Then, the F_(s) calculation section 340 calculates a spatial luminance difference sum total as a sum total of absolute values of spatial luminance differences which are luminance differences between pixels in the base block from the base block determination section 120 at step S932. Incidentally, the process at step S932 is an example of a spatial luminance difference sum total calculation procedure.

Then, the F_(t) calculation section 330 calculates a temporal luminance difference sum total as a sum total of temporal luminance differences which are luminance differences between pixels corresponding to each other in a corresponding block from the corresponding block extraction section 310 and the base block from the base block determination section 120 at step S933. Incidentally, the process at step S933 is an example of the spatial luminance difference sum total calculation procedure. Then, the L calculation section 370 calculates a search range for a reference frame based on the spatial luminance difference sum total from the F_(t) calculation section 330 and the temporal luminance difference sum total from the F_(s) calculation section 340 at step S934. Incidentally, the process at step S934 is an example of the search range calculation procedure.

Then, the reference block determination section 140 determines a reference block from within a reference frame from the reference frame buffer 130 at step S935. Then, the correlation calculation section 871 calculates a correlation degree between the base block and the reference block based on the luminance values of the pixels of the base block and the luminance values of the pixels of the reference block at step S936. Then, the correlation degree calculated by the correlation calculation section 871 and the position of the reference block are stored in an associated relationship with each other into the correlation map storage section 872 at step S937. Thereafter, the position acquisition section 873 decides whether or not the correlation degree and the position with regard to all reference blocks determined in the search region are stored in the correlation map storage section 872 at step S938. Then, if the correlation degree and the position with regard to all reference blocks are not stored as yet, then the processing returns to step S935. Consequently, the processes described above are repeated until the correlation degree and the position with regard to all reference blocks set in the search region are stored.

On the other hand, if the correlation degree and the position with regard to all reference blocks are stored, then the position acquisition section 873 acquires the position of that one of the reference blocks which exhibits the lowest correlation degree at step S939. Then, the motion vector calculation section 874 calculates a motion vector based on the position of the reference block from the position acquisition section 873 and the position of the base block at step S940. Incidentally, the processes at step S935 to 940 are examples of a block matching calculation procedure.

Then, it is decided whether or not the motion vector calculated by the motion vector calculation section 874 is calculated with regard to all base blocks at step S941. Then, if the calculation of the motion vector with regard to all base blocks is not completed as yet, then the processing returns to step S941, at which a new base block is determined. Then, the processes at the steps beginning with step S942 are repeated. On the other hand, if the calculation of the motion vector with regard to all reference blocks is completed, then the motion vector calculation process is ended.

In this manner, with the second embodiment of the present invention, since a search region for a motion vector with respect to a base block can be defined appropriately by provision of the search range production section 320, the accuracy in detection of the motion vector can be improved. Further, since the search region can be suppressed to a minimum region, the processing amount by block matching can be reduced. Consequently, power consumption of the motion vector detection apparatus 300 can be reduced.

21 3. Third Embodiment>

[Example of a Configuration of the Motion Detector]

FIG. 14 shows an example of a configuration of a motion detector 600 according to a third embodiment of the present invention. Referring to FIG. 14, the motion detector 600 carries out hierarchical motion estimation of estimating a motion by detecting motion vectors hierarchically using a reduced image. The motion detector 600 includes a base frame reduced image production section 610, a frame memory 620, a reference frame reduced image production section 630, a first motion vector detection section 640 and a second motion vector detection section 650.

The base frame reduced image production section 610 produces a reduced image of a predetermined magnification of a base frame supplied from a signal line 601. The base frame reduced image production section 610 supplies the produced reduced image as a base frame reduced image to the first motion vector detection section 640.

The frame memory 620 temporarily retains a base frame supplied thereto from the signal line 601. The frame memory 620 supplies the retained base frame as a reference frame to the reference frame reduced image production section 630 and the second motion vector detection section 650.

The reference frame reduced image production section 630 produces a reduced image of a predetermined magnification of a reference frame supplied thereto from the frame memory 620. The reference frame reduced image production section 630 supplies the produced reduced image as a reference frame reduced image to the first motion vector detection section 640.

The first motion vector detection section 640 detects, based on correlation degrees between a base block set in a base frame reduced image and a plurality of reference blocks set in a reference frame reduced image, a motion vector of the base reduced image with respect to the base block. The first motion vector detection section 640 supplies a motion vector detected with regard to a base block in a base frame reduced image to the second motion vector detection section 650. For example, the motion vector detection apparatus 300 described hereinabove with reference to FIG. 7 can be applied to the first motion vector detection section 640. Consequently, since a motion vector can be detected with a high efficiency, the power consumption can be reduced.

The second motion vector detection section 650 detects, based on correlation degrees between a base block set to a base frame and a plurality of reference blocks set to a reference frame, a motion vector with respect to the base block. In particular, the second motion vector detection section 650 defines a search region based on a motion vector from the first motion vector detection section 640. Then, the second motion vector detection section 650 detects a motion vector with respect to a base block in a base frame based on correlation degrees between a plurality of reference blocks set in the defined search region and a base block set in the base frame. Further, the second motion vector detection section 650 supplies a detected motion vector with respect to a base block of a base frame to a signal line 609. For example, the motion vector detection apparatus 300 described hereinabove with reference to FIG. 7 can be applied to the second motion vector detection section 650.

Here, a hierarchical search technique of detecting a motion vector with respect to a base block of a base frame based on a motion vector from the first motion vector detection section 640 by the second motion vector detection section 650 is described briefly with reference to FIG. 15.

[Example of Detection of a Motion Vector]

FIG. 15 illustrates a hierarchical search technique of the motion detector 600 in the third embodiment of the present invention. Referring to FIG. 15, there are illustrated a base frame 602, a reference frame 621, an estimated block 654, a base reduced frame 611, a reference reduced frame 631, and motion vectors 641 and 651 to 653. The base frame 602 is an image of a current frame of a dynamic picture. The reference frame 621 is an image preceding to the base frame 602 stored in the frame memory 620. A base block 603 is a block of the base frame 602 for detecting a motion vector.

The base reduced frame 611 is a reduced image of the base frame 602 produced by the base frame reduced image production section 610. The reference reduced frame 631 is a reduced image of the reference frame 621 produced by the reference frame reduced image production section 630. A base frame 612 is a block of the base reduced frame 611 corresponding to the base block 603. Here, it is assumed that the base reduced frame 611 and the reference reduced frame 631 are reduced to 1/N time from the base frame 602 and the reference frame 621, respectively.

In this instance, the first motion vector detection section 640 detects a motion vector 641 with respect to the base frame 612 set to the base reduced frame 611. Then, the second motion vector detection section 650 determines the position of the estimated block 654 based on the motion vector 651 obtained by increasing the motion vector 641 detected by the first motion vector detection section 640 to n times. Then, the second motion vector detection section 650 detects the motion vector 652 with respect to the position of the estimated block 654 and calculates the motion vector 653 with respect to the base block 603 of the base frame 602 based on the motion vector 651 and the motion vector 652.

According to the third embodiment of the present invention, by applying the motion vector detection apparatus 300 to the first and second motion vector detection sections 640 and 650 in this manner, a motion vector can be detected with a high degree of accuracy.

<4. Fourth Embodiment>

[Example of a Configuration of the Motion Vector Detection Apparatus]

FIG. 16 shows an example of a configuration of a motion vector detection apparatus 700 according to a fourth embodiment of the present invention. Referring to FIG. 16, the motion vector detection apparatus 700 includes the corresponding block extraction section 310 and the search range production section 320 described hereinabove with reference to FIG. 7 in addition to the components described hereinabove with reference to FIG. 1. The corresponding block extraction section 310 and the search range production section 320 in the motion vector detection apparatus 700 are similar to those described hereinabove with reference to FIG. 7, and therefore, overlapping description of them is omitted herein to avoid redundancy. Further, the other components of the motion vector detection apparatus 700 are similar to those described hereinabove with reference to FIG. 1, and therefore, overlapping description of them is omitted herein to avoid redundancy.

In this manner, in the fourth embodiment of the present invention, since the effectiveness calculation section 160 is provided, even if a plurality of moving bodies are included in a frame, a motion vector can be detected with a high degree of accuracy. Further, the search region can be optimized to reduce the calculation process of the correlation degree by block matching.

In this manner, with the embodiment of the present invention, the effectiveness degree corresponding to each pixel position of a base block can be calculated to improve the detection accuracy of a motion vector with respect to the base block.

It is t be noted that an example wherein the motion vector detection apparatus 300 and 700 according to the embodiments of the present invention are applied to an image pickup apparatus 710 is described with reference to FIG. 17.

FIG. 17 shows an example of a configuration of the image pickup apparatus 710 according to the embodiment of the present invention. Referring to FIG. 17, the image pickup apparatus 710 includes a control section 711, an image pickup section 712, a signal processing section 715, a face detection section 716 and a motion vector detection section 717. The image pickup apparatus 710 further includes a blurring correction section 718, an image storage section 719, a bus 721, a user interface 722, an image compression-decompression section 725, a storage medium 726, an input/output terminal 727, a memory 728 and a vibration sensor 729. It is to be noted that transfer of an image signal between different blocks is carried out by direct communication or by communication through the image storage section 719 or the bus 721.

The control section 711 controls the components of the image pickup apparatus 710 based on various control programs stored in a memory not shown.

The image pickup section 712 includes an optical system 713 and an image pickup device 714, and photoelectrically coverts incident light from an image pickup object into an electric signal and outputs the electric signal to the signal processing section 715. The optical system 713 includes a plurality of lens groups including a focusing lens, a zoom lens, a blurring correcting lens and a blurring correcting prism and outputs incident light from an image pickup object inputted through the lens groups to the image pickup device 714. The image pickup device 714 photoelectrically converts the incident light outputted from the optical system 713 and outputs a resulting electric signal to the signal processing section 715. It is to be noted that the image pickup section 712 can optically correct blurring caused and detected by movement or inclination of the blurring correcting lens, deformation or inclination of the blurring correcting prism, movement of the image pickup device 714 and so forth. Such optical correlation is carried out under the control of the control section 711.

The signal processing section 715 carries out various signal processes for an electric signal outputted from the image pickup device 714 and outputs image data obtained by the signal processes to the image storage section 719, image compression-decompression section 725, user interface 722 and face detection section 716. The signal processes by the signal processing section 715 include a noise reduction process, a level correction process, an A/D conversion process and a color correction process. Further, the signal processing section 715 executes various image processes for an image inputted from the associated blocks in accordance with an instruction from the control section 711.

The face detection section 716 detects the face of a person included in an image corresponding to inputted image data.

The motion vector detection section 717 detects a motion vector of each of blocks, into which an image corresponding to inputted image data is divided, by an image process and outputs a value corresponding to the detected motion vector to the control section 711. To the motion vector detection section 717, the motion vector detection apparatus 300 and 700 according to the embodiments of the present invention can be applied.

The blurring correction section 718 moves, based on a blurring correction amount and so forth calculated based on the motion vectors detected by the motion vector detection section 717, the position of the image corresponding to the inputted image to correct the blurring of the image. It is to be noted that the blurring correction section 718 includes electronic blurring correction means and optical blurring correction means.

It is to be noted that an image whose blurring is corrected by the blurring correction section 718 is outputted to the image compression-decompression section 725. Then, the image compression-decompression section 725 carries out an image compression process for the image whose blurring is corrected and records the resulting image on the storage medium 726. Further, the image whose blurring is corrected is displayed on a display section 723.

The image storage section 719 stores image data of an object of processing by the image pickup apparatus 710.

The bus 721 is a shared bus for transmitting image data. The user interface 722 includes a display section 723 and a selection acceptance section 724 and provides an interface to a user who uses the image pickup apparatus 710.

The display section 723 displays an image corresponding to image data outputted from the signal processing section 715 or the image compression-decompression section 725. The display section 723 displays, for example, a picked up image which is an image of an image pickup object picked up by the image pickup apparatus 710.

The selection acceptance section 724 converts selection information inputted by the user into an electric signal and outputs the electric signal to the control section 711. For example, if the face detection section 716 detects the face from within the picked up image outputted from the image pickup section 712, then a blurring correction process based on the face detected from within the picked up image is carried out by the image pickup apparatus 710. In this manner, where a picked up image includes the face, it is possible to establish a mode (ON setting) wherein a blurring correction process is executed for the face or another mode (OFF setting) wherein the blurring correction process is not executed for the face. Such ON/OFF setting is carried out by the selection acceptance section 724.

It is to be noted that the user interface 722 may be configured such that, for example, the display section 723 and the selection acceptance section 724 are formed integrally as a touch panel or the display section 723 is formed from a liquid crystal display (LCD) unit and the selection acceptance section 724 is formed as hardware keys.

The image compression-decompression section 725 compresses or decompresses various image data inputted thereto in response to various image processes. For example, image data for which a compression process is carried out by the image compression-decompression section 725 is outputted to the storage medium 726 and stored on the storage medium 726. Further, image data for which a decompression process is carried out by the image compression-decompression section 725 is outputted to the image storage section 719, display section 723 and face detection section 716. It is to be noted that the compression method may be, for example, the JPEG (Joint Photographic Experts Group) method.

The storage medium 726 is an image storage medium which stores image data outputted from the image compression-decompression section 725 and outputs the image data stored therein to the image compression-decompression section 725. It is to be noted that, as the image storage medium, a magnetic disk, an optical disk, a semiconductor storage medium, a magnetic tape and so forth are available. Further, the image storage medium includes at least one of an external removable storage medium and a built-in storage medium.

The input/output terminal 727 is used to output image data outputted from the image compression-decompression section 725 to an external apparatus such as an external storage medium therethrough and output image data inputted from the external storage medium to the image compression-decompression section 725 therethrough.

The memory 728 is a volatile/nonvolatile storage medium for storing various types of information.

The vibration sensor 729 detects vibration of the image pickup apparatus 710 and detects a blurring component which does not rely upon an image, that is, a blurring component of the body of the image pickup apparatus 710, and outputs various kinds of detected information to the control section 711. The vibration sensor 729 can be implemented using, for example, a gyro sensor, a velocity sensor, or an acceleration sensor.

In this manner, the power consumption of the image pickup apparatus can be suppressed by applying the motion vector detection apparatus 300 and 700 according to the embodiments of the present invention to the image pickup apparatus 710.

In this manner, by applying the motion vector detection apparatus 100 and 700 according to the embodiments of the present invention to the image pickup apparatus 710, the detection accuracy of a motion vector by the image pickup apparatus 710 can be improved.

It is to be noted that, while, in the foregoing description of the embodiments of the present invention, the reference frame is a frame preceding by one frame distance to the base frame, the present invention can be applied also where the reference frame is a current frame and the base frame is a frame preceding by one frame distance to the reference frame.

It is to be noted that, while, in the embodiments of the present invention described above, the luminance value with regard to all pixels of the base block is used, the luminance value of only some of the pixels of the base block may be used alternatively.

Further, it is to be noted that the embodiments of the present invention can be applied to an image encoding process for compressing a dynamic picture in a storage process in an image pickup apparatus or an image storage apparatus such as a camcorder or a video recorder.

Furthermore, it is to be noted that the embodiments of the present invention can be applied to a blurring moderation process in a reproduction process or a storage process in an image pickup apparatus or an image storage apparatus such as a camcorder or a video recorder wherein blurring when a dynamic image is picked up is detected.

Further, it is to be noted that the embodiments of the present invention can be applied to a noise reduction process in a reproduction process or a storage process in an image pickup apparatus or an image storage apparatus such as a camcorder or a video recorder wherein random noise arising from an image pickup processing section is detected.

Further, it is to be noted that the embodiments of the present invention can be applied to a frame interpolation process in a reproduction process for reducing shortage of the resolution in a temporal direction by shortage in frames in an image storage apparatus such as a video recorder.

Further, it is to be noted that the embodiments of the present invention indicate examples for embodying the present invention and have a corresponding relationship to different features of the present invention as described in the appended claims. However, the present invention is not limited to the embodiments but various modifications can be made without departing from the spirit and scope of the present invention.

Further, the processing procedure described in the description of the embodiments of the present invention may be grasped as a method having such a series of steps as described above or may be grasped as a program for causing a computer to execute the series of steps or as a storage medium for storing the program. As the storage medium, a CD (Compact Disc), an MD (Mini Disc), a DVD (Digital Versatile Disk), a memory card, a blue ray disk (Blu-ray Disc (registered trademark)) and so forth are available.

The present application contains subject matter related to that disclosed in Japanese Priority Patent Application JP 2008-284628 filed with the Japan Patent Office on Nov. 5, 2008, the entire content of which is hereby incorporated by reference. 

What is claimed is:
 1. A motion vector detection apparatus, comprising: a spatial luminance difference sum total calculation section that calculates a sum total of absolute values of spatial luminance differences, which are luminance differences of pixels of a base block set in a base frame with respect to a predetermined pixel; a temporal luminance difference sum total calculation section that calculates a sum total of absolute values of temporal luminance differences, which are luminance differences between corresponding pixels of the base block, and a corresponding block in a reference frame corresponding to the base block; a search range calculation section that calculates a search range of the reference frame for searching for a motion vector with respect to the base block based on the sum total of the absolute values of the spatial luminance differences and the sum total of the absolute values of the temporal luminance differences; and a block matching calculation section that sets a reference block in the search range of the reference frame determined depending upon the search range and performs block matching based on the correlation degree between the set reference block and the base block to calculate the motion vector, wherein said spatial luminance difference sum total calculation section calculates, as the sum total of the absolute values of the spatial luminance differences, sum totals of absolute values of the spatial luminance differences in both of a horizontal direction and a vertical direction with respect to the base block, and said search range calculation section calculates search ranges in the horizontal and vertical directions based on the sum total of the absolute values of the temporal luminance differences and the sum totals of the absolute values of the spatial luminance differences in the horizontal and vertical directions.
 2. The motion vector detection apparatus according to claim 1, wherein said search range calculation section calculates the search range such that, as the value of the sum total of the absolute values of the spatial luminance differences increases, the size of the search range decreases, but as value of the sum total of the absolute values of the temporal luminance differences increases, the size of the search range increases.
 3. The motion vector detection apparatus according to claim 2, wherein said search range calculation section calculates the search range such that the size of the search range increases in inverse proportion to the sum total of the absolute values of the spatial luminance differences but increases in proportion to the sum total of the absolute values of the temporal luminance differences.
 4. The motion vector detection apparatus according to claim 1, wherein said spatial luminance difference sum total calculation section adds the absolute values of the spatial luminance differences in the horizontal and vertical directions to a positive side spatial luminance difference sum total or totals or a negative side spatial luminance difference sum total or totals based on the sign of the temporal luminance difference with respect to the predetermined pixel in the base block and the signs of the spatial luminance differences in the horizontal and vertical directions.
 5. The motion vector detection apparatus according to claim 4, wherein said temporal luminance difference sum total calculation section adds the absolute values of the temporal luminance differences in the horizontal and vertical directions to the positive side temporal luminance difference sum total or totals or the negative side temporal luminance difference sum total or totals based on the sign of the temporal luminance difference with respect to the predetermined pixel in the base block and the signs of the spatial luminance differences in the horizontal and vertical directions.
 6. The motion vector detection apparatus according to claim 5, wherein said search range calculation section includes a positive side search range calculation section configured to calculate the search ranges on the positive side in the horizontal and vertical directions based on the positive side spatial luminance difference sum totals in the horizontal and vertical directions and the positive side temporal luminance difference sum totals in the horizontal and vertical directions, and a negative side search range calculation section configured to calculate the search ranges on the negative side in the horizontal and vertical directions based on the negative side spatial luminance difference sum totals in the horizontal and vertical directions and the negative side temporal luminance difference sum totals in the horizontal and vertical directions.
 7. The motion vector detection apparatus according to claim 4, further comprising a likelihood calculation section configured to calculate a positive side likelihood and a negative side likelihood based on the positive side spatial luminance difference sum totals and the negative side spatial luminance difference sum totals, respectively, in the horizontal and vertical directions.
 8. The motion vector detection apparatus according to claim 7, wherein said search range calculation section includes a positive side search range calculation section configured to calculate the search ranges on the positive side in the horizontal and vertical directions based on the sum totals of the absolute values of the spatial luminance differences, the sum totals of the absolute values of the temporal luminance differences and the positive side likelihoods in the horizontal and vertical directions, and a negative side search range calculation section configured to calculate the search ranges on the negative side in the horizontal and vertical directions based on the sum totals of the absolute values of the spatial luminance differences, the sum totals of the absolute values of the temporal luminance differences and the negative side likelihoods in the horizontal and vertical directions.
 9. The motion vector detection apparatus according to claim 1, further comprising: a base luminance value production section configured to produce a base luminance value of the base block based on the luminance value of the predetermined pixel in the base block; and an effectiveness calculation section configured to calculate an effectiveness degree of each of the pixels of the base block based on the luminance values of the pixels of the base block and the base luminance value; said block matching calculation section including a correlation calculation section configured to set a plurality of reference blocks in a search region in the reference frame which is determined depending upon the search range and calculate, for each of the reference blocks, the correlation degree of the reference block with respect to the base block based on the luminance values of the pixels in the set reference block which correspond to the pixel positions of the base block and the effective degrees corresponding to the pixel positions of the base block.
 10. The motion vector detection apparatus according to claim 1, wherein said search range calculation section determines one of the search range calculated based on the sum total of the absolute values of the spatial luminance differences and the sum total of the absolute values of the temporal luminance differences and a predetermined range as the search range.
 11. A motion vector detection method, comprising the steps of: calculating a sum total of absolute values of spatial luminance differences which are luminance differences of pixels of a base block set in a base frame with respect to a predetermined pixel; calculating a sum total of absolute values of temporal luminance differences which are luminance differences between corresponding pixels of the base block and a corresponding block in a reference frame corresponding to the base block; calculating a search range of the reference frame for searching for a motion vector with respect to the base block based on the sum total of the absolute values of the spatial luminance differences and the sum total of the absolute values of the temporal luminance differences; and setting a reference block in the search range of the reference frame determined depending upon the search range and carrying out block matching based on the correlation degree between the set reference block and the base block to calculate the motion vector, wherein calculating the sum total of the absolute values of the spatial luminance differences includes calculating, as the sum total of the absolute values of the spatial luminance differences, sum totals of absolute values of the spatial luminance differences in both of a horizontal direction and a vertical direction with respect to the base block, and calculating the search range of the reference frame includes calculating search ranges in the horizontal and vertical directions based on the sum total of the absolute values of the temporal luminance differences and the sum totals of the absolute values of the spatial luminance differences in the horizontal and vertical directions.
 12. A non-transitory computer readable medium storing program code, the program code being executable by a processor to perform operations comprising: calculating a sum total of absolute values of spatial luminance differences which are luminance differences of pixels of a base block set in a base frame with respect to a predetermined pixel; calculating a sum total of absolute values of temporal luminance differences which are luminance differences between corresponding pixels of the base block and a corresponding block in a reference frame corresponding to the base block; calculating a search range of the reference frame for searching for a motion vector with respect to the base block based on the sum total of the absolute values of the spatial luminance differences and the sum total of the absolute values of the temporal luminance differences; and setting a reference block in the search range of the reference frame determined depending upon the search range and carrying out block matching based on the correlation degree between the set reference block and the base block to calculate the motion vector, wherein calculating the sum total of the absolute values of the spatial luminance differences includes calculating. as the sum total of the absolute values of the spatial luminance differences, sum totals of absolute values of the spatial luminance differences in both of a horizontal direction and a vertical direction with respect to the base block, and calculating the search range of the reference frame includes calculating search ranges in the horizontal and vertical directions based on the sum total of the absolute values of the temporal luminance differences and the sum totals of the absolute values of the spatial luminance differences in the horizontal and vertical directions.
 13. A motion vector detection apparatus, comprising: spatial luminance difference sum total calculation means for calculating a sum total of absolute values of spatial luminance differences which are luminance differences of pixels of a base block set in a base frame with respect to a predetermined pixel; temporal luminance difference sum total calculation means for calculating a sum total of absolute values of temporal luminance differences which are luminance differences between corresponding pixels of the base block and a corresponding block in a reference frame corresponding to the base block; search range calculation means for calculating a search range of the reference frame for searching for a motion vector with respect to the base block based on the sum total of the absolute values of the spatial luminance differences and the sum total of the absolute values of the temporal luminance differences; and block matching calculation means for setting a reference block in the search range of the reference frame determined depending upon the search range and carrying out block matching based on the correlation degree between the set reference block and the base block to calculate the motion vector, wherein said spatial luminance difference sum total calculation means calculates, as the sum total of the absolute values of the spatial luminance differences, sum totals of absolute values of the spatial luminance differences in both of a horizontal direction and a vertical direction with respect to the base block, and said search range calculation means calculates search ranges in the horizontal and vertical directions based on the sum total of the absolute vlues of the temporal luminance differences and the sum totals of the absolute values of the spatial luminance differences in the horizontal and vertical directions.
 14. The method according to claim 11, further includes adding the absolute values of the spatial luminance differences in the horizontal and vertical directions to a positive side spatial luminance difference sum total or totals or a negative side spatial luminance difference sum total or totals based on the sign of the temporal luminance difference with respect to the predetermined pixel in the base block and the signs of the spatial luminance differences in the horizontal and vertical directions.
 15. The non-transitory computer readable medium according to claim 12, wherein the operations further comprise adding the absolute values of the spatial luminance differences in the horizontal and vertical directions to a positive side spatial luminance difference sum total or totals or a negative side spatial luminance difference sum total or totals based on the sign of the temporal luminance difference with respect to the predetermined pixel in the base block and the signs of the spatial luminance differences in the horizontal and vertical directions.
 16. The apparatus according to claim 13, wherein said spatial luminance difference sum total calculation means adds the absolute values of the spatial luminance differences in the horizontal and vertical directions to a positive side spatial luminance difference sum total or totals or a negative side spatial luminance difference sum total or totals based on the sign of the temporal luminance difference with respect to the predetermined pixel in the base block and the signs of the spatial luminance differences in the horizontal and vertical directions. 